package com.bidevalution.business.vote.launch.impl;

import com.bidevalution.business.exception.VoteException;
import com.bidevalution.business.service.VoteUnitNumService;
import com.bidevalution.business.vote.launch.AutoVoteBaseLaunch;
import com.bidevalution.business.vote.vi.AutoVoteJobVi;
import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Log4j2
@Component
public class AutoVoteByUnitMinNumLaunch implements AutoVoteBaseLaunch {

    @Autowired
    private VoteUnitNumService voteUnitNumService;

    @SneakyThrows
    @Override
    public void execute(AutoVoteJobVi autoVoteJobVi) throws VoteException {
        log.info("xxxxxxxxxxxxxxxxAutoVoteByUnitMinNumLaunch");
        voteUnitNumService.checkInitiateVote(autoVoteJobVi.getSectionId(),autoVoteJobVi.getSectionStepId(),3,1);
    }
}
